#ifndef _CONFIG_H_
#define _CONFIG_H_

#include <stdbool.h>
#include <stddef.h>
#include <stdlib.h>
#include <string.h>
#include "cJSON.h"

typedef struct {
	char *host;
	int   port;
} RedisConfig;

typedef struct {
	int   id;
	char *service;
	bool  enabled;
} Service;

typedef struct {
	Service *items;
	size_t   count;
} ServiceArray;

typedef struct {
	char        *name;
	int          port;
	RedisConfig  redis;
	ServiceArray services;
} AppConfig;

#endif // _CONFIG_H_